package lesson2.com.marvel;


import lesson2.com.general.Flyer;
import lesson2.com.general.InterfaceC;


public class Superman  implements Flyer, InterfaceC
{
    @Override
    public void takeOff() {
        System.out.println("Bound.....away");
    }

    @Override
    public void land() {
        System.out.println("Locate Lois....");
    }

    @Override
    public void fly() {
        System.out.println("Really coooooolllll !!");
    }

    @Override
    public void someMethod() {
        
    }

    @Override
    public void someMethod(int x) {
        
    }
    
    public void leapTallBuildings() throws KryptoniteException{
        // check to see if Kryptonite is around
        // continue to leap or not
        int ran = (int)((Math.random()*5)+1);
        if(ran<=3){
            throw new KryptoniteException("Can't leap... feeling  weak");
        }else{
            System.out.println("Whoopee I can jump");
        }
    }
}